   <template>
     <router-view></router-view>
   </template>

   <script setup>
   import { onMounted } from 'vue';
   import { isAuthenticated } from './router';

   onMounted(() => {
     // 检查localStorage或cookies中是否有登录令牌/信息
     const token = localStorage.getItem('token');
     if (token) {
       isAuthenticated.value = true;
     }
   });
   </script>